home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / key_c31.zip / KTERROR.C < prev    next >
C/C++ Source or Header  |  1992-05-11  |  2KB  |  65 lines

  1. /*MAY      1991                             version 3*/
  2.  
  3. /****************************************************************************
  4. *                                        *
  5. *    KeyTree Utilities Error Messages                    *
  6. *                                        *
  7. *    Copyright 1991 by Rewse Consultants Limited                *
  8. *                                        *
  9. *  The KeyTree Utilities are issued as shareware. In case you are unaware   *
  10. *  of how the shareware system works, it is NOT 'free' software.        *
  11. *  No initial charge is made for the software, so that you can try it out   *
  12. *  without obligation. However, if you continue to use the software (and in *
  13. *  the case of the KeyTree Utilities, use programs created using them),     *
  14. *  then you are required to pay a registration fee. To register your use of *
  15. *  the KeyTree Utilities, we ask you to pay a miserly £30 (UK Pounds), a    *
  16. *  mere fraction of the cost that you are saving in time and effort. Please *
  17. *  send your registration fee to :                        *
  18. *                                        *
  19. *    Rewse Consultants Limited                        *
  20. *    44, Horseshoe Road, Pangbourne, Reading, Berkshire RG8 7JL, UK      *
  21. ****************************************************************************/
  22. extern int ktERRNO;
  23. char *kt_error_str[] = {
  24. "no errors",                /* 0  */
  25. "file already exists",                  /* 1  */
  26. "no such file",                /* 2  */
  27. "not a KeyTree file",            /* 3  */
  28. "invalid index number",            /* 4  */
  29. "too many files open",            /* 5  */
  30. "file is corrupt",            /* 6  */
  31. "insufficient memory",            /* 7  */
  32. "can't read index data",        /* 8  */
  33. "file is not open",            /* 9  */
  34. "access denied",            /* 10 */
  35. "",                    /* 11 */
  36. "file open for reading only",        /* 12 */
  37. "invalid parameters",            /* 13 */
  38. "",                    /* 14 */
  39. "invalid record length",        /* 15 */
  40. "",                    /* 16 */
  41. "no record with this key",        /* 17 */
  42. "can't read record",            /* 18 */
  43. "physical end of file reached",        /* 19 */
  44. "record not yet read",            /* 20 */
  45. "physical start of file reached",    /* 21 */
  46. "record is locked",            /* 22 */
  47. "record chains not allowed",        /* 23 */
  48. "",                    /* 24 */
  49. "no ktReadAll issued yet",        /* 25 */
  50. "logical end of file reached",        /* 26 */
  51. "logical start of file reached",    /* 27 */
  52. "record is deleted",            /* 28 */
  53. "record is not deleted",        /* 29 */
  54. "duplicate key in index %"        /* 30 and onwards */
  55. };
  56. char *ktError()
  57. {    int x;
  58.  
  59.     if (ktERRNO >= 30)
  60.         { kt_error_str[30][23] = ktERRNO%10 + 48;
  61.           x = 30;
  62.         }
  63.     else      x = ktERRNO;
  64.     return(kt_error_str[x]);
  65. }